﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;

namespace YZAutoDWR.Entity;

[Table("WorkOrder")]
public class WorkOrderEntity : BaseEntity
{
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.None)]
    [Column("Id")]
    [MaxLength(50)]
    [DisplayName("工单ID")]
    [JsonProperty("id")]
    public string? Id { get; set; }

    [Column("productId")]
    [MaxLength(50)]
    [JsonProperty("productId")]
    public string? ProductId { get; set; }

    [Column("moduleId")]
    [MaxLength(50)]
    [JsonProperty("moduleId")]
    public string? ModuleId { get; set; }

    [Column("ticketTypeId")]
    [MaxLength(50)]
    [DisplayName("工单类型")]
    [JsonProperty("ticketTypeId")]
    public string? TicketTypeId { get; set; }

    [Column("ticketTypeName")]
    [MaxLength(100)]
    [DisplayName("工单类型名称")]
    [JsonProperty("ticketTypeName")]
    public string? TicketTypeName { get; set; }

    [Column("operatingSystemId")]
    [JsonProperty("operatingSystemId")]
    public int? OperatingSystemId { get; set; }

    [Column("operatingSystemText")]
    [MaxLength(100)]
    [JsonProperty("operatingSystemText")]
    public string? OperatingSystemText { get; set; }

    [Column("browserId")]
    [JsonProperty("browserId")]
    public int? BrowserId { get; set; }

    [Column("browserText")]
    [MaxLength(100)]
    [JsonProperty("browserText")]
    public string? BrowserText { get; set; }

    [Column("title")]
    [MaxLength(500)]
    [DisplayName("工单标题")]
    [JsonProperty("title")]
    public string? Title { get; set; }

    [Column("description")]
    [MaxLength(500)]
    [DisplayName("工单描述")]
    [JsonProperty("description")]
    public string? Description { get; set; }

    [Column("severityId")]
    [DisplayName("工单严重程度")]
    [JsonProperty("severityId")]
    public int? SeverityId { get; set; }

    [Column("severityText")]
    [MaxLength(50)]
    [DisplayName("工单严重程度描述")]
    [JsonProperty("severityText")]
    public string? SeverityText { get; set; }

    [Column("priorityId")]
    [DisplayName("工单优先级")]
    [JsonProperty("priorityId")]
    public int? PriorityId { get; set; }

    [Column("priorityText")]
    [MaxLength(50)]
    [DisplayName("工单优先级描述")]
    [JsonProperty("priorityText")]
    public string? PriorityText { get; set; }

    [Column("ticketStatus")]
    [DisplayName("工单状态")]
    [JsonProperty("ticketStatus")]
    public int? TicketStatus { get; set; }

    [Column("ticketStatuText")]
    [MaxLength(50)]
    [DisplayName("工单状态描述")]
    [JsonProperty("ticketStatuText")]
    public string? TicketStatuText { get; set; }

    [Column("reworkTimes")]
    [DisplayName("工单返工次数")]
    [JsonProperty("reworkTimes")]
    public int? ReworkTimes { get; set; }

    [Column("satisfaction")]
    [JsonProperty("satisfaction")]
    public int? Satisfaction { get; set; }

    [Column("evaluation")]
    [MaxLength(50)]
    [JsonProperty("evaluation")]
    public string? Evaluation { get; set; }

    [Column("scoring")]
    [JsonProperty("scoring")]
    public double? Scoring { get; set; }

    [Column("assigneeId")]
    [MaxLength(50)]
    [JsonProperty("assigneeId")]
    public string? AssigneeId { get; set; }

    [Column("assigneeName")]
    [MaxLength(100)]
    [JsonProperty("assigneeName")]
    public string? AssigneeName { get; set; }

    [Column("createdUserId")]
    [MaxLength(50)]
    [DisplayName("工单创建人ID")]
    [JsonProperty("createdUserId")]
    public string? CreatedUserId { get; set; }

    [Column("createdUserName")]
    [MaxLength(100)]
    [DisplayName("工单创建人")]
    [JsonProperty("createdUserName")]
    public string? CreatedUserName { get; set; }

    [Column("maintainerId")]
    [MaxLength(50)]
    [JsonProperty("maintainerId")]
    public string? MaintainerId { get; set; }

    [Column("processorId")]
    [MaxLength(50)]
    [DisplayName("工单当前处理人ID")]
    [JsonProperty("processorId")]
    public string? ProcessorId { get; set; }

    [Column("processorName")]
    [MaxLength(100)]
    [DisplayName("工单当前处理人")]
    [JsonProperty("processorName")]
    public string? ProcessorName { get; set; }

    [Column("createdOrganizeCode")]
    [MaxLength(50)]
    [DisplayName("工单组织代码")]
    [JsonProperty("createdOrganizeCode")]
    public string? CreatedOrganizeCode { get; set; }

    [Column("userDisposeId")]
    [MaxLength(50)]
    [DisplayName("工单解决人ID")]
    [JsonProperty("userDisposeId")]
    public string? UserDisposeId { get; set; }

    [Column("remark")]
    [MaxLength(50)]
    [JsonProperty("remark")]
    public string? Remark { get; set; }

    [Column("resUrl")]
    [MaxLength(50)]
    [JsonProperty("resUrl")]
    public string? ResUrl { get; set; }

    [Column("sulutionId")]
    [MaxLength(50)]
    [JsonProperty("sulutionId")]
    public string? SulutionId { get; set; }

    [Column("isTimeOut")]
    [DisplayName("工单是否已超时")]
    [JsonProperty("isTimeOut")]
    public bool? IsTimeOut { get; set; }

    [Column("createdTime")]
    [DisplayName("工单创建时间")]
    [JsonProperty("createdTime")]
    public DateTime? CreatedTime { get; set; }

    [Column("processedTime")]
    [DisplayName("工单处理时间")]
    [JsonProperty("processedTime")]
    public DateTime? ProcessedTime { get; set; }

    [Column("expectedCompletionTime")]
    [DisplayName("工单期望完成时间")]
    [JsonProperty("expectedCompletionTime")]
    public DateTime? ExpectedCompletionTime { get; set; }

    [Column("plancompleteTime")]
    [DisplayName("工单计划完成时间")]
    [JsonProperty("plancompleteTime")]
    public DateTime? PlancompleteTime { get; set; }
}